<div class="page-content" >
<div class="panel panel-default">
        <div class="panel-heading">
            <strong>素材管理</strong>
        </div>
        <div class="panel-body">
            <div id="toolbar" style="width: 100%;">
                <form id="filter" method="get" action="<{:addons_url('index')}>" class="form-horizontal">
                     
					 <div class="form-group">
                        <div class="col-sm-3">
						 <input type="hidden" name="memu" value="System" />
						<input type="text" name="kw" placeholder ="搜事件名称或keyName" class="form-control" value="<{$_REQUEST['kw']}>" />
						
                        </div>
						 
						 <div class="col-sm-4" style="float:right; width:auto">
                            <input type="submit" class="btn btn-primary pull-right" value="筛选">
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-sm-8">
                            <a  href="<{:addons_url('addType',array('memu'=>'System'))}>" class="btn btn-default">
                                <i class="fa fa-plus"></i>
                                添加素材
                            </a>
                        </div>
                         
                    </div>
                </form>
            </div>
       <div class="bootstrap-table">
		<div class="fixed-table-container" style="padding-bottom: 0px;"> 
			<div class="fixed-table-body"> 
				<table id="data-table" class="table"><thead>
			<tr>
			 
			<th style="" data-field="id"><div class="th-inner sortable both desc">ID</div><div class="fht-cell"></div></th>
			<th style="" data-field="name"><div class="th-inner ">素材名称</div><div class="fht-cell"></div></th>
			<th style="" data-field="name"><div class="th-inner ">素材ID</div><div class="fht-cell"></div></th>
			 
			<th style="" data-field="id"><div class="th-inner ">操作</div><div class="fht-cell"></div></th>
			</tr></thead>
			<tbody>
			<volist name="data" id="vo">
			<tr data-index="0">
			<td style=""><input type="radio" title="<{$vo.name}>" keyName="<{$vo.keyName}>" name="material"></td>
			<td style=""><{$vo.name}></td>
			<td style=""><{$vo.keyName}></td>
			 
			<td style="">
			 
					 <a  href="<{:addons_url('addType',array('id'=> $vo['id'],'memu'=>'System'))}>" class="btn btn-primary btn-xs">编辑</a>
                            <a  href="<{:addons_url('deleteType',array('id'=> $vo['id'],'memu'=>'System'))}>" onclick="return confirm('确认需要删除些信息吗？');" class="btn btn-primary btn-xs">删除</a>
								<a  href="/BoxAddon/Blocks/Index/blocks_image/blocks_name/wx_new_<{$vo['keyName']}>" data-type="modal"  class="btn btn-primary btn-xs">&nbsp;图文消息</a>
							 		
	 
			</td>
			</tr>
			</volist>
			</tbody></table>
			 </div> 
			  <include file="./Apps/BoxAdmin/View/Ace/Public/pager.html" />
		</div>
		<a  id="select_material" class="btn btn-primary">&nbsp;确认</a>
	    </div>
			<div class="clearfix"></div>
        </div>
    </div>
</div>	
<script type="text/javascript">
$("#select_material").click(function(event) {
	var select=$("[name='material']:checked");
	 var data={
	 	'title':$(select).attr("title"),
	 	'keyName':$(select).attr("keyName")
	 };
	 $(document).trigger('select_material',[data]);
});
	
</script>
	 
	 
	 
	 